"""
容器之间相互嵌套(   了解   )
"""
# 列表里面嵌套列表,跟字典
listA=[
    [12,34,12],
    [24,56,12],
    (12,34,12)
]

# for a in listA:
#     for b in a:
#         print(b)
# 字典 套列表
# dictA={
#     "name":"李四",
#     "age":18,
#     "hobby":["打球","睡觉","吃饭"]
# }
# for e in dictA["hobby"]:
#     print(e)



dictA={
    "G1569":["北京南","天津南","11月08日","18:06","18:39","00:33"],
    "G1567":["北京南","天津南","11月08日","18:15","18:49","00:34"],
    "G8917":["北京南","天津南","11月08日","18:20","19:19","00:59"],
    "G203":["北京南","天津南","11月08日","18:35","19:09","00:34"]
}

print("车次\t\t出发站\t到达站\t出发日期\t出发时间\t到达时间\t历时时长")
for key,value in dictA.items():
    print(key,*value,sep="\t")
    #     print(key,end="\t")
    #     for info in value:
    #         print(info,end= "\t")
    #     print()
#输入车次
che=input("请输入要购买的车次:")  #
if che  in dictA:
    che_ren=input("请输入乘车人姓名:")
    che_info=dictA[che]   #获取的车辆信息,是一个列表
    print(che_info)
    print(f"[12306]{che_ren}购票成功,{che_info[2]}{che}次,{che_info[0]}{che_info[3]}开")




















